package com.tiancheng.trade.settlement.vo.settlement.admin;

import lombok.Data;
import org.apache.commons.lang3.StringUtils;

import java.time.LocalDate;

/**
 * 招商银行清分明细对账，查询条件
 */
@Data
public class ClearDetailCmbQueryVO {

    /**
     * serialVersionUID
     */
    private static final long serialVersionUID = 1L;

    private String clearBatchNo;//清分批号
    private String subMchId;//子商户号
    private String orderId;//订单编号(外部订单号)
    private String bankOrderId;//银行订单号(招行订单号)
    private String subOrderId;//子订单编号(子订单号)
    private Integer clearAmount;//清分金额,单位分
    private String payAcctName;//付款方名称
    private String colAcctName;//收款方名称

    /**
     * 订单日期开始时间
     */
    private LocalDate payTimeBegin;

    /**
     * 订单日期结束时间
     */
    private LocalDate payTimeEnd;

    /**
     * 当前页
     */
    Integer currentPage;

    /**
     * 页大小
     */
    Integer pageSize;

    public Integer getCurrentPage() {
        if (null == currentPage || currentPage < 0) {
            currentPage = 1;
        }
        return currentPage;
    }

    public Integer getPageSize() {
        if (null == pageSize || pageSize <= 0) {
            pageSize = 10;
        }
        return pageSize;
    }

    public String getClearBatchNo() {
        if (StringUtils.isNotEmpty(clearBatchNo)) {
            clearBatchNo = clearBatchNo.trim();
        }
        return clearBatchNo;
    }

    public String getSubMchId() {
        if (StringUtils.isNotEmpty(subMchId)) {
            subMchId = subMchId.trim();
        }
        return subMchId;
    }

    public String getOrderId() {
        if (StringUtils.isNotEmpty(orderId)) {
            orderId = orderId.trim();
        }
        return orderId;
    }

    public String getBankOrderId() {
        if (StringUtils.isNotEmpty(bankOrderId)) {
            bankOrderId = bankOrderId.trim();
        }
        return bankOrderId;
    }

    public String getSubOrderId() {
        if (StringUtils.isNotEmpty(subOrderId)) {
            subOrderId = subOrderId.trim();
        }
        return subOrderId;
    }

    public String getPayAcctName() {
        if (StringUtils.isNotEmpty(payAcctName)) {
            payAcctName = payAcctName.trim();
        }
        return payAcctName;
    }

    public String getColAcctName() {
        if (StringUtils.isNotEmpty(colAcctName)) {
            colAcctName = colAcctName.trim();
        }
        return colAcctName;
    }

}
